<script setup>
// 4. 接收props
defineProps({
  list: Array,
  height: Number,
});
</script>

<template>
  <!-- 💥 记得处理高度问题 -->
  <swiper
    :style="{ height: height + 'rpx' }"
    :interval="1000"
    indicator-dots
    autoplay
    circular
  >
    <swiper-item v-for="item in list" :key="item.id">
      <image :src="item.imgUrl" />
    </swiper-item>
  </swiper>
</template>

<style lang="scss" scoped>
/* #ifdef H5 */
uni-image {
  width: 100%;
  height: 100%;
}
/* #endif */
</style>
